/*
 * Copyright (c) 2010 CCX(China) Co.,Ltd. All Rights Reserved.
 *
 * This software is the confidential and proprietary information of
 * CCX(China) Co.,Ltd. ("Confidential Information").
 * It may not be copied or reproduced in any manner without the express 
 * written permission of CCX(China) Co.,Ltd.
 *
 * @author Administrator
 * Date: 2010-7-8 下午03:11:37
 */
package com.ccxe.manage.service.impl;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.ccxe.manage.dao.impl.IM_Menu_Role_DaoImpl;

/**
 * @author Administrator
 * 
 */
public class Role_Permi_ViewService extends BaseRequestService {

	public Role_Permi_ViewService(HttpServletRequest request,
			HttpServletResponse response) {
		this.request = request;
		this.response = response;
	}

	@Override
	protected String buildJspUrl() {
		return "/jsp/role/permission.jsp";
	}

	@Override
	public void buildParameters() {
		try {
			String roleId = request.getParameter("roleId");

			IM_Menu_Role_DaoImpl imrDao = new IM_Menu_Role_DaoImpl();
			List<Map<?, ?>> list = imrDao.getTreeListByRoleId(roleId);
			request.setAttribute("list", list);
			request.setAttribute("roleId", roleId);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
